﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace PlatypusPlanner.Components.Model
{
    public class Message
    {
        public int MessageID { get; set; }
        public string Body { get; set; }
        public string Title { get; set; }

        public Message(XmlNode node)
        {
            MessageID = int.Parse(node.Attributes["id"].Value);
            Body = node.SelectSingleNode("body").InnerXml;
            Title = node.SelectSingleNode("title").InnerText;
        }
        public Message(int messageID, string title, string body)
        {
            MessageID = messageID;
            Title = title;
            Body = body;
        }
    }
}